Post

Replies

Boosts

Views

Activity

Push notification in Background works fine when App runs by Xcode, but does not work when App runs by itself.
Hello,I have a very strange synptom like described in the title.My app is using push notification and it works fine when I run the app from Xcode RUN.Now, I use my iPhone and tap the app to launch it and let it go to background.While the app is in background and the app received push notification, the bannar is shown on the iPhone display. I tap the banner then app is launched, but the following function is not called.func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)I have no idea why this happens.Does anyone have any solution?Additional information.When I use Xcode to RUN the app and the app received push notification in Background, that function is called in Background.When I tap the app and and the app received push notification in Background, that function is called in Active but not called in Backgroiund.Why?
12
0
13k
Nov ’19
This app cannot be installed because the consistency could not be confirmed.
My clients have a trouble to install the ipa file to iPhone12 (iOS14.3) via iTunes by using their Windows10 PC, showing the error message "This app cannot be installed because the consistency could not be confirmed.". (This message is the translation from Japanese error message, so it may not be exact the same message shown in English.) I myself can install the same ipa to my iPhone8 (iOS 14.3) via iTunes by using my Windows7 PC. I have no idea why this trouble happens only to my client's iPhone12. Please let me know how I can solve this trouble if anyone knows it. Best regards,
0
0
634
Jan ’21
Longer camera exposure time
I would like to know about the exposure time setting of the iPhone camera. According to the specifications of the back camera of my iPhone 8, the maximum exposure time is 1/3 second, but I would like to expose for a longer time. Looking at the camera app on the App Store, it seems that there are some apps that can expose in seconds, but how is it realized? I tried to use AVFoundation's activeVideoMinFrameDuration, activeVideoMaxFrameDuration, and setExposureModeCustom, but could not find the solution. If anyone has any knowledge about this area, please help me. Best regards,
0
0
845
Feb ’21
iPhone 13 / 13 mini builtInUltraWideCamera trouble
I ran into a strange problem. A camera app using AVFoundation, I use the following code; captureDevice = AVCaptureDevice.default(AVCaptureDevice.DeviceType.builtInUltraWideCamera, for: AVMediaType.video, position: .back) then, let isAutoFocusSupported = captureDevice.isFocusModeSupported(.autoFocus) "isAutoFocusSupported" should be "true". For iPhone 13 pro, it is "true". But for 13 / 13 mini, it is "false". Why?
4
0
1.9k
Oct ’21
Xcode 13.2.1 does not recognize iOS 15.2
I installed Xcode 13.2.1 to my MacBook Air M1 model, then updated my iPhone 13 pro with iOS 15.2. I opened the Xcode project which was correctly working with previous version then RUN it with iPhone 13 pro which iOS is the latest one 15.2, Xcode does not recognize iOS 15.2. "Failed to prepare device for development." message is displayed. It says "This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility." Why?
8
0
7.7k
Jan ’22
It takes several seconds to show up camera preview when selected long frame duration
I developed a camera app with AVFoundation framework where long frame duration is required. When I set the following setting, camera.activeVideoMinFrameDuration = CMTimeMake(value: 1, timescale: 2) camera.activeVideoMaxFrameDuration = CMTimeMake(value: 1, timescale: 2) it takes several seconds to show up camera preview. Recently I learned that iPhone uses "Rolling Shutter" and I guess this may cause this delay. Is my guess correct? In addition, if I set timescale: 1, then captureOutput(_:didOutput:from:)is not called at all. Why? I am using the latest model iPhone 13 pro and this has a capability of 1 - 60 fps range. Please advise me if anyone knows further details.
0
0
805
Jan ’22
How to get greyscale video image from camera?
I am developing a camera app and need to get realtime greyscale video from camera. I am using AVFoundation framework and set video output like this; private func setupCamera() { ... let videoOutput = AVCaptureVideoDataOutput() videoOutput.videoSettings = [kCVPixelBufferPixelFormatTypeKey as AnyHashable as! String : Int(kCVPixelFormatType_32BGRA)] videoOutput.setSampleBufferDelegate(self, queue: DispatchQueue.main) ... } For captureOutput, I write like this; func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { let imageBuffer: CVPixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer)! CVPixelBufferLockBaseAddress(imageBuffer, CVPixelBufferLockFlags(rawValue: 0)) let baseAddress = CVPixelBufferGetBaseAddress(imageBuffer)! let bytesPerRow = UInt(CVPixelBufferGetBytesPerRow(imageBuffer)) let width = CVPixelBufferGetWidth(imageBuffer) let height = CVPixelBufferGetHeight(imageBuffer) let bitsPerCompornent = 8 var colorSpace = CGColorSpaceCreateDeviceGray() var bitmapInfo = CGBitmapInfo(rawValue: CGImageAlphaInfo.none.rawValue) let context = CGContext(data: baseAddress, width: Int(width), height: Int(height), bitsPerComponent: Int(bitsPerCompornent), bytesPerRow: Int(bytesPerRow), space: colorSpace, bitmapInfo: bitmapInfo.rawValue)! as CGContext let imageRef = context.makeImage()! let image = UIImage(cgImage: imageRef, scale: 1.0, orientation: UIImage.Orientation.up) CVPixelBufferUnlockBaseAddress(imageBuffer, CVPixelBufferLockFlags(rawValue: 0)) captureImageView.image = image } The point is var colorSpace = CGColorSpaceCreateDeviceGray() var bitmapInfo = CGBitmapInfo(rawValue: CGImageAlphaInfo.none.rawValue) The image I can get is something like 'greyscale video' but not complete video image. How can I get complete greyscale video? Please advise me if anyone knows the answer to get greyscale realtime video.
1
0
981
Feb ’22
AutoLayout constraint reset after tableView cell is created.
In the process of acquiring images asynchronously from a website and displaying them in an imageView in a tableView cell, I am implementing a process to reset the heightConstraint of the imageView to match the aspect ratio of the acquired image. In this process, if the image is acquired after the cell is created, the height will not change even if the imageView's heightConstraint is reset. So I ran tableView.reloadRows(at: [indexPath], with: .none) after retrieving the image and it displayed correctly. Is this correct solution? Is it correct to assume that if I change the autolayout constraint of an object in a cell after the cell is created, it will not be reflected in the screen display unless I reload the cell?
3
0
2.2k
Apr ’22
Photos app accepts the same album name. Is this bug?
Hello, It is a very simple question. I can create two albums in Photos app, which have the same album names. Is this a bug or not? For instance, create one album named "test01", then again create the same name album. Two "test01" albums exist. If I create a code to save an image to "test01" album, there is the same image saved in both albums. I am afraid if it is a bug. I think the same name album should not be created. It is highly appreciated if any Apple personnel respond to my question. Best regards,
0
0
639
Sep ’22
Special camera application issue
I am having trouble with a special camera application and am posting to ask for your wisdom. I am implementing a process to shoot 4k video in the AVFoundation framework. The app does not take video, but rather attaches a film camera shutter mechanism in front of the iPhone camera and acquires still images by the film camera shutter release. For details, please visit the following web site; https://www.digi-swap.com/ Until the film camera shutter is released, the iPhone camera gains a complete black image. When the shutter of the film camera is released, for example, the shutter speed is 1/30s, the image (light coming through the film camera's lens) for 1/30s is irradiated to the image sensor of the iPhone, and this image is acquired as a still image. Naturally, there will be insufficient light, so the aperture of the iPhone camera is opened to maximum and a shutter speed of 1/1s or longer is used. Focus is also fixed. When taking a picture under these conditions, the center of the still image is relatively bright, but the periphery is dark. I guess the cause of this is a problem with less launching time of the iPhone camera from complete black to 1/30s light reception. In other words, it may be because the camera does not have enough time to capture a clean image. I am hoping to confirm if my understanding is correct with the engineers who are developing the camera area at Apple, and hearing back from you would be highly appreciated. Best regards,
3
0
1.4k
Sep ’22
iPhone 15 ISO range
Hi, I have a camera app which can select ISO value. For iPhone 13 pro, the minimum ISO value is 40. Therefore, I set the initial ISO value to 40. Now, I replaced my iPhone 13 pro with the latest model iPhone 15 pro, and found the minimum ISO value for iPhone 15 is 55. My camera app can be use with iPhone 15 as well as iPhone 15 pro. Unfortunately I do not have an iPhone 15, so I cannot get the range of ISO value by using actual device. I searched the net, but there is no information regarding ISO range for iPhone 15 series. For that reason, I would like to know the range of ISO value for the iPhone 15. If anyone knows it, please let me know. Thanks for your help in advance.
0
0
1.6k
Oct ’23